package com.wbc.doublesql.controller;

import com.wbc.doublesql.dao.master.DemoMapper1;
import com.wbc.doublesql.dao.second.DemoMapper2;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Tim
 * @Description
 * @create 2021-07-27 14:22
 */
@RestController
public class DemoController {

    @Resource
    private DemoMapper1 demoMapper1;

    @Resource
    private DemoMapper2 demoMapper2;


    //第一个数据库接口
    @RequestMapping("test1")
    public String test1(){
        Integer test = demoMapper1.getTest();
        System.out.println(test);
        return "test1:"+test;
    }


    //第二个数据库接口

    @RequestMapping("test2")
    public String test2(){
        Integer test = demoMapper2.getTest();
        System.out.println(test);
        return "test2:"+test;
    }


}
